<?php

include_once ("../dao/dishDAO.php");
include_once ("../service/imageService.php");

function countNumOfDishByName($keyword) {
    return countDishByName($keyword);
}

function getDishesBy($keyword, $start_position, $row_per_page) {
    return findDishBy($keyword, $start_position, $row_per_page);
}

function addDish($cateId, $dishName, $dishPrice, $dishDescription) {
    return insertDish($cateId, $dishName, $dishPrice, $dishDescription);
}

function getCurrentDishID() {
    $row = selectCurrentDishID();
    return $row['MAX_ID'];
}

function getDishById($id) {
    return findDishById($id);
}

function countDishByCategory($catID) {
    return countNumDishByCategory($catID);
}

function editDish($dishId, $cateId, $dishName, $dishPrice, $dishDescription) {
    return updateDish($dishId, $cateId, $dishName, $dishPrice, $dishDescription);
}

function removeDish($id) {
    deleteDish($id);
}

function getDishByCategory($cateId) {
    return findDishByCategory($cateId);
}

function getDishByCateAndDay($cateId, $dayId, $keyword) {
    return findDishByCateAndDay($cateId, $dayId, $keyword);
}

function getAvailableDish($dayId) {
    return selectAvailableDish($dayId);
}

function getDishInDay($dayId) {
    return selectDishInDay($dayId);
}

function checkAssignedDish($dishId) {
    return isAssignedDish($dishId);
}

function getAll() {
    return getAllDish();
}

?>